<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      /* 类选择器  .   */
      .testColor {
        color: red;
      }

      /* 后代选择器 */
      div span {
        color: rgb(255, 0, 242);
      }
    </style>
  </head>
  <body>
    <p>段落1</p>
    <p class="testColor">段落2</p>
    <p>段落3</p>
    <button class="testColor">按钮</button><br />

    <span>外面的span</span>
    <div>
      <span>里面的span</span>
      <div>
        <span>里面的里面的span</span>
      </div>
    </div>
  </body>
</html>
